package luccy.attribute;

import java.util.Iterator;

import javax.servlet.http.HttpServletRequest;

import luccy.util.EnumerationIterator;

public class RequestImpl implements Request {

	private HttpServletRequest request;
	
	public RequestImpl(HttpServletRequest request) {
		this.request = request;
	}
	
	public Object getAttribute(final String key) {
		return request.getAttribute(key);
	}
	
	public void setAttribute(final String key, final Object value) {
		request.setAttribute(key, value);
	}

	public Iterator<String> getAttributeNames() {
		return new EnumerationIterator<String>(request.getAttributeNames());
	}

	public void removeAttribute(final String key) {
		request.removeAttribute(key);
	}
}
